<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv=Content-Type content="text/span; charset=utf-8"/>
    <meta http-equiv=X-UA-Compatible content="IE=edge"/>
    <meta content="MSHTML 6.00.6000.16939" name=GENERATOR/>
    <script>var weburl = '{yun:}$config.sy_weburl{/yun}';</script>
    <script type="text/javascript" src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.1.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script type="text/javascript" src="{yun:}$config.sy_weburl{/yun}/js/My97DatePicker/WdatePicker.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
    <link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
    <script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}"></script>
    <script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>


    <script type="text/javascript" src="{yun:}$config.sy_weburl{/yun}/js/member_public.js?v={yun:}$config.cachecode{/yun}"></script>
    <script type="text/javascript" src="{yun:}$config.sy_weburl{/yun}/js/public.js?v={yun:}$config.cachecode{/yun}"></script>
    <link href="{yun:}$com_style{/yun}/images/m_style.css?v={yun:}$config.cachecode{/yun}" type="text/css" rel="stylesheet"/>
    <link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />


<script language="javascript">
    layui.use(['layer', 'form'], function(){
        var layer = layui.layer;
        form = layui.form;
        form.on('select(test111)', function(data){
            var companyId=(data.value);
            a = {yun:}json_encode($jobs){/yun};
            var num = 0;
            if(companyId){
                $("#job_id").html("");
                    $.each(a, function(key, val) {
                        if(val.company_id == companyId){
                            var option1 = $("<option>").val(val[0]).text(val[2]);
                            $("#job_id").append(option1);
                            form.render('select');
                            num++;
                        }
                    });
                if( num == 0 ){
                    var option1 = $("<option>").val('').text('该企业未发布职位');
                    $("#job_id").append(option1);
                    form.render('select');
                }
                    $("#job_id").get(0).selectedIndex=0;


            }
//            //alert(companyId);
////            $.ajax({
////                type: 'POST',
////                //url: 'index.php?m=admin_handle_entry&c=jobs',
////                url: "{yun:}url m=admin_handle_entry c=jobs{/yun}",
////                data: {companyId:companyId},
////                dataType:  'json',
////                success: function(data){
////                    $("#City").html("");
////                    $.each(data, function(key, val) {
////                        var option1 = $("<option>").val(val.areaId).text(val.fullname);
////                        $("#City").append(option1);
////                        form.render('select');
////                    });
////                    $("#City").get(0).selectedIndex=0;
////                }
////            });
////            $.post(weburl+"/admin/index.php?m=admin_handle_entry&c=jobs",{id:companyId},function(data){
////                alert(data);
////            })
        });

    });
function news_preview(url){
	$(".job_box_div").html("<img src='"+url+"' style='max-width:500px' />");//
 	$.layer({
		type : 1,
		title : '查看图片',
		closeBtn : [0 , true],
		offset : ['20%' , '30%'],
		border : [10 , 0.3 , '#000', true],
		area : ['560px','auto'],
		page : {dom : '#news_preview'}
	}); 
}
function checkform(myform){
    if ($("#member_name").val()=="") {
        layer.msg('请填写员工姓名！', 2,8);return false;
    }
    if(!(/^1[34578]\d{9}$/.test($("#member_phone").val())) || $("#member_phone").val()==""){
        layer.msg('请正确填写手机号！', 2,8);return false;
    }
    if ($("#company_id").val()=="") {
        layer.msg('请选择公司！', 2,8);return false;
    }
    if ($("#job_id").val()=="") {
        layer.msg('请选择职位！', 2,8);return false;
    }

    var card = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
    if(card.test($("#member_card").val()) === false || $("#member_card").val()=="")
    {
        layer.msg('请正确填写身份证号！', 2,8);return false;
    }
//    if ($("#member_age").val()=="") {
//        layer.msg('请填写员工年龄！', 2,8);return false;
//    }
    $("#newsform").submit();

}
function back(myform){
    window.history.go(-1);
}


</script>
<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />

<title>后台管理</title>

</head>
<body class="body_ifm">
<div class="infoboxp"> 
<!--<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">管理员根据自己运营需求自由添加新闻！添加新闻内容（针对新闻的标题、关健词和简短描述）进行SEO角度去设置！可以提升搜索引擎对网站收录友好度。</div>
</div>
</div>-->
  <div class="clear"></div>
  <div class="tag_box mt10" style="border: 0">
    <iframe  id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
    <form id="newsform" name="myform" target="supportiframe" action="index.php?m=admin_handle_entry&c=save" method="post" encType="multipart/form-data" class="layui-form">
         <div class="form-search-title"><span class="bl-icon"></span><span class="bl-title">办理入职</span></div>
         <div class="form-search-content">
             <div class="bl-row">
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-col bl-col-8 ">
                    <div class="bl-form-item">
                        <div class="bl-form-item__label" style="width: 120px;"><span class="import-inputpop">*</span>员工姓名 :</div>
                        <div class="bl-form-item__content"  style="margin-left: 120px;">
                            <input type="text" name="member_name" id="member_name" size="60" lay-verify="required" value="{yun:}$row.member_name{/yun}" autocomplete="off" class="layui-input" placeholder="输入员工姓名">
                        </div>
                    </div>
                 </div>
                 <div class="bl-col bl-col-8 ">
                     <div class="bl-form-item">
                         <div class="bl-form-item__label" style="width: 120px;"><span class="import-inputpop">*</span>联系电话 :</div>
                         <div class="bl-form-item__content"  style="margin-left: 120px;">
                             <input type="text" name="member_phone" id="member_phone"  lay-verify="required" value="{yun:}$row.member_phone{/yun}" size="60"  autocomplete="off" class="layui-input" placeholder="输入员工联系电话">
                         </div>
                     </div>
                 </div>
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-clear"></div>
             </div>
             <div class="bl-row">
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-col bl-col-8 ">
                     <div class="bl-form-item">
                         <div class="bl-form-item__label" style="width: 120px;">年    龄 :</div>
                         <div class="bl-form-item__content"  style="margin-left: 120px;">
                             <input type="text" name="member_age" id="member_age" size="60" lay-verify="required" value="{yun:}$row.member_age{/yun}" autocomplete="off" class="layui-input" placeholder="输入年龄">
                         </div>
                     </div>
                 </div>
                 <div class="bl-col bl-col-8 ">
                     <div class="bl-form-item">
                         <div class="bl-form-item__label" style="width: 120px;"><span class="import-inputpop">*</span>性    别 :</div>
                         <div class="bl-form-item__content"  style="margin-left: 120px;">
                             <!--<input type="text" name="member_phone" id="member_phone"  lay-verify="required" value="{yun:}$row.member_phone{/yun}" size="60"  autocomplete="off" class="layui-input" placeholder="输入员工联系电话">-->

                                 <select name="member_sex" id="member_sex">
                                     <option value="">请选择性别</option>
                                     <option value="0" {yun:}if $row.company_sex ==0{/yun}selected="selected"{yun:}/if{/yun}>女</option>
                                     <option value="1" {yun:}if $row.company_sex ==1{/yun}selected="selected"{yun:}/if{/yun}>男</option>
                                 </select>

                         </div>
                     </div>
                 </div>
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-clear"></div>
             </div>

             <div class="bl-row">
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-col bl-col-8 ">
                     <div class="bl-form-item">
                         <div class="bl-form-item__label" style="width: 120px;"><span class="import-inputpop">*</span>身份证号 :</div>
                         <div class="bl-form-item__content"  style="margin-left: 120px;">
                             <input type="text" name="member_card" id="member_card" size="60" lay-verify="required" value="{yun:}$row.member_card{/yun}" autocomplete="off" class="layui-input" placeholder="输入身份证号">
                         </div>
                     </div>
                 </div>
                 <div class="bl-col bl-col-8 ">
                     <div class="bl-form-item">
                         <div class="bl-form-item__label" style="width: 120px;">家庭住址 :</div>
                         <div class="bl-form-item__content"  style="margin-left: 120px;">
                             <input type="text" name="member_address" id="member_address"  lay-verify="required" value="{yun:}$row.member_address{/yun}" size="60"  autocomplete="off" class="layui-input" placeholder="输入联系地址">
                         </div>
                     </div>
                 </div>
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-clear"></div>
             </div>


             <div class="bl-row">
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-col bl-col-8 ">
                     <div class="bl-form-item">
                         <div class="bl-form-item__label" style="width: 120px;"><span class="import-inputpop">*</span>入职企业 :</div>
                         <div class="bl-form-item__content"  style="margin-left: 120px;">
                             <!--<input type="text" name="member_age" id="member_age" size="60" lay-verify="required" value="{yun:}$row.member_age{/yun}" autocomplete="off" class="layui-input" placeholder="输入员工姓名">-->

                                 <select  lay-filter="test111" id="company_id" name="company_id">
                                     <option value="">请选择企业</option>
                                     {yun:}foreach from=$companys key=k item=v{/yun}
                                     <option value="{yun:}$v.id{/yun}" {yun:}if $v.id==$row.company_id{/yun}selected="selected"{yun:}/if{/yun}>{yun:}$v.company_name{/yun}</option>
                                     {yun:}/foreach{/yun}
                                 </select>

                         </div>
                     </div>
                 </div>
                 <div class="bl-col bl-col-8 ">
                     <div class="bl-form-item">
                         <div class="bl-form-item__label" style="width: 120px;"><span class="import-inputpop">*</span>入职岗位 :</div>
                         <div class="bl-form-item__content"  style="margin-left: 120px;">
                             <!--<input type="text" name="member_phone" id="member_phone"  lay-verify="required" value="{yun:}$row.member_phone{/yun}" size="60"  autocomplete="off" class="layui-input" placeholder="输入员工联系电话">-->

                                 <select name="job_id" lay-filter="" id="job_id">


                                 </select>

                         </div>
                     </div>
                 </div>
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-clear"></div>
             </div>

             <div class="bl-row">
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-col bl-col-8 ">
                     <div class="bl-form-item">
                         <div class="bl-form-item__label" style="width: 120px;">学    历 :</div>
                         <div class="bl-form-item__content"  style="margin-left: 120px;">
                             <!--<input type="text" name="member_age" id="member_age" size="60" lay-verify="required" value="{yun:}$row.member_age{/yun}" autocomplete="off" class="layui-input" placeholder="输入员工姓名">-->

                                 <select name="member_edu"  id="member_edu">
                                     <option value="">请选择最高学历</option>
                                     {yun:}foreach from=$userdata.user_edu key=j item=v{/yun}
                                     <option value="{yun:}$userclass_name[$v]{/yun}" {yun:}if $row.member_edu==$userclass_name[$v]{/yun}selected="selected"{yun:}/if{/yun}>{yun:}$userclass_name[$v]{/yun}</option>
                                     {yun:}/foreach{/yun}
                                 </select>

                         </div>
                     </div>
                 </div>
                 <div class="bl-col bl-col-8 ">
                     <div class="bl-form-item">
                         <div class="bl-form-item__label" style="width: 120px;">政治面貌 :</div>
                         <div class="bl-form-item__content"  style="margin-left: 120px;">
                             <!--<input type="text" name="member_phone" id="member_phone"  lay-verify="required" value="{yun:}$row.member_phone{/yun}" size="60"  autocomplete="off" class="layui-input" placeholder="输入员工联系电话">-->

                                 <select name="member_polity"  id="member_polity">
                                     <option value="">请选择政治面貌</option>
                                     {yun:}foreach from=$userdata.user_polity key=j item=v{/yun}
                                     <option value="{yun:}$userclass_name[$v]{/yun}" {yun:}if $row.member_polity==$v{/yun}selected="selected"{yun:}/if{/yun}>{yun:}$userclass_name[$v]{/yun}</option>
                                     {yun:}/foreach{/yun}
                                 </select>

                         </div>
                     </div>
                 </div>
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-clear"></div>
             </div>
             <div class="bl-row">
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-col bl-col-8 ">
                     <div class="bl-form-item">
                         <div class="bl-form-item__label" style="width: 120px;">入职时间 :</div>
                         <div class="bl-form-item__content"  style="margin-left: 120px;">
                             <!--<input type="date" name="entry_time" id="entry_time"  lay-verify="required" value="{yun:}$row.entry_time{/yun}" size="60"  autocomplete="off" class="layui-input" style="display:inline;width:400px;">-->
                             <input class="e-input Wdate " style="width: 100%;" name="entry_time" id="entry_time" type="text" value="{yun:}$row.entry_time{/yun}" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})">
                         </div>
                     </div>
                 </div>
                 <div class="bl-col bl-col-8 "><div class="grid-content"></div></div>
                 <div class="bl-col bl-col-4 "><div class="grid-content"></div></div>
                 <div class="bl-clear"></div>
             </div>



             <!--<div class="bl-row">-->
                 <!--<div class="bl-col bl-col-4 "><div class="grid-content"></div></div>-->
                 <!--<div class="bl-col bl-col-16 ">-->
                     <!--<div class="bl-form-item">-->
                         <!--<div class="bl-form-item__label" style="width: 120px;"><span class="import-inputpop">*</span>年    龄</div>-->
                         <!--<div class="bl-form-item__content"  style="margin-left: 120px;">-->
                             <!--信息信息-->
                         <!--</div>-->
                     <!--</div>-->
                 <!--</div>-->
                 <!--<div class="bl-col bl-col-4 "><div class="grid-content"></div></div>-->
                 <!--<div class="bl-clear"></div>-->
             <!--</div>-->

             <div class="bl-row">
                <div class="bl-formbutton-box">
                    {yun:}if $row.id{/yun}
                    <input type="hidden" name="id" size="40" value="{yun:}$row.id{/yun}"/>
                    <input type="hidden" name="lasturl" value="{yun:}$lasturl{/yun}">
                    <input type="hidden" name="updateentry" value="1">
                    <input type="hidden" name="source" value="{yun:}$row.source{/yun}">
                    <input type="hidden" name="member_id" value="{yun:}$row.member_id{/yun}">
                    <input type="hidden" name="key" value="{yun:}$key{/yun}">
                    <!--<input class="layui-btn layui-btn-normal" type="button" onclick="checkform()" value="&nbsp;保 存&nbsp;"  />-->
                    <!--<input class="layui-btn layui-btn-normal" type="reset" onclick="back()" value="&nbsp;取 消 &nbsp;" />-->
                    <input type="button" value="取消" class="admin_new_bth" onclick="back()">
                    <input type="button" value="确认" class="admin_new_cz_tj"  onclick="checkform()" >
                    {yun:}else{/yun}
                    <input type="hidden" name="entryadd" value="1">

                    <input type="button" value="取消" class="admin_new_bth" onclick="back()">
                    <input type="button" value="确认" class="admin_new_cz_tj"  onclick="checkform()" >
                    {yun:}/if{/yun}
                </div>
             </div>
         </div>



	  <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
    </form>
  </div>
</div>
<div id="news_preview"  style="display:none;width:560px ">
	<div style="height:300px; overflow:auto;width:560px;" >
		<div class="job_box_div" style="text-align:center;margin-top:10px;"></div>
	</div>
</div>
<style>
.layui-form-item {
    margin-bottom: 0px;
    clear: both;
}
</style>
{yun:}include file="$adminstyle/checkdomain.htm"{/yun}
<script type="text/javascript">
	var ue = UE.getEditor('myEditor');
</script>
<script >
  layui.use(['layer', 'form','element'], function(){
    var layer = layui.layer
    ,form = layui.form
	,element = layui.element
    ,$ = layui.$;

  });
  </script>
  <script src="{yun:}$config.sy_weburl{/yun}/js/layui.upload.js?v={yun:}$config.cachecode{/yun}" type='text/javascript'></script>
</body>
</html>